YNQ  YNQ-1.5.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
File Info Operations

Data Structures

struct  CCFileTime
 
struct  CCFileInfo_t
 
struct  CCFileInfo
 
struct  CCVolumeInfo
 

Typedefs

typedef struct CCFileInfo_t FileInfo_t
 

Functions

NQ_BOOL ccGetFilePointer (NQ_HANDLE handle, NQ_UINT64 *offset)
 
NQ_BOOL ccSetFilePointer (NQ_HANDLE handle, NQ_INT64 *offset, NQ_INT method)
 
NQ_BOOL ccServerSideDataCopyA (NQ_CHAR *srcPath, NQ_CHAR *dstPath, void *context, CCServerSideCopyCallback *callBack)
 
NQ_BOOL ccServerSideDataCopy (NQ_WCHAR *srcPath, NQ_WCHAR *dstPath, void *context, CCServerSideCopyCallback *callBack)
 
NQ_BOOL ccGetDiskFreeSpaceA (const NQ_CHAR *pathName, NQ_UINT *sectorsPerCluster, NQ_UINT *bytesPerSector, NQ_UINT *freeClusters, NQ_UINT *totalClusters, NQ_UINT *fsType, NQ_UINT *serialNumber)
 
NQ_BOOL ccGetDiskFreeSpace (const NQ_WCHAR *pathName, NQ_UINT *sectorsPerCluster, NQ_UINT *bytesPerSector, NQ_UINT *freeClusters, NQ_UINT *totalClusters, NQ_UINT *fsType, NQ_UINT *serialNumber)
 
NQ_BOOL ccGetDiskFreeSpaceExA (const NQ_CHAR *pathName, NQ_UINT *sectorsPerCluster, NQ_UINT *bytesPerSector, NQ_UINT64 *freeClusters, NQ_UINT64 *totalClusters, NQ_UINT *fsType, NQ_UINT *serialNumber)
 
NQ_BOOL ccGetDiskFreeSpaceEx (const NQ_WCHAR *pathName, CCVolumeInfo *volumeInfo)
 
NQ_UINT32 ccGetFileAttributesA (const NQ_CHAR *fileName)
 
NQ_BOOL ccGetFileAttributes (const NQ_WCHAR *fileName, NQ_UINT32 *attributes)
 
NQ_BOOL ccSetFileAttributesA (const NQ_CHAR *fileName, NQ_UINT32 attributes)
 
NQ_BOOL ccSetFileAttributes (const NQ_WCHAR *fileName, NQ_UINT32 attributes)
 
NQ_BOOL ccGetFileInformationByNameA (const NQ_CHAR *fileName, FileInfo_t *fileInfo)
 
NQ_BOOL ccGetFileInformationByName (const NQ_WCHAR *fileName, CCFileInfo *fileInfo)
 
NQ_BOOL ccSetFileSizeByNameA (const NQ_CHAR *fileName, NQ_UINT32 sizeLow, NQ_UINT32 sizeHigh)
 
NQ_BOOL ccSetFileSizeByName (const NQ_WCHAR *fileName, NQ_UINT64 size)
 
NQ_BOOL ccSetFileSizeByHandle (NQ_HANDLE handle, NQ_UINT64 size)
 
NQ_BOOL ccGetFileTime (NQ_HANDLE handle, CCFileTime *pCreation, CCFileTime *pLastAccess, CCFileTime *pLastWrite)
 
NQ_BOOL ccSetFileTime (NQ_HANDLE handle, CCFileTime *pCreation, CCFileTime *pLastAccess, CCFileTime *pLastWrite)
 
NQ_BOOL ccGetFileSize (NQ_HANDLE handle, NQ_UINT64 *fileSize)
 
NQ_BOOL ccGetFileInformationByHandle (NQ_HANDLE handle, CCFileInfo *fileInfo)
 

Detailed Description

Typedef Documentation

typedef struct CCFileInfo_t FileInfo_t

This structure is used when calling File Information related CIFS Client API calls, it is used by ccGetFileInformationByNameA() for backward compatibility.

Function Documentation

NQ_BOOL ccGetFilePointer ( NQ_HANDLE  handle,
NQ_UINT64 offset 
)

This function is called by application to withdraw the current position in the file. The result is returned as a 64-bit number.

Parameters
handleHandle value returned by calling ccCreateFile().
offsetPointer to 64 bit value of the file offset.
Returns
This function returns TRUE if the specified file information was retrieved successfully or FALSE otherwise. The application can inspect the error code for the failure reason.
NQ_BOOL ccSetFilePointer ( NQ_HANDLE  handle,
NQ_INT64 offset,
NQ_INT  method 
)

This function is called by application to set a file pointer of the file read/write location in the opened file.

Parameters
handleHandle value returned by calling ccCreateFile().
offsetPointer to 64 bit value of the file offset. Upon successful return this variable contains new offset.
methodFile seek method (see SEEK_FILE_BEGIN, SEEK_FILE_CURRENT and SEEK_FILE_END Macros in File seek constants module)
Returns
This function returns TRUE if the specified file information was set successfully or FALSE otherwise. The application can inspect the error code for the failure reason. Upon successful return offset variable contains new offset. Use cmS64Assign() for initializing offset parameter.
NQ_BOOL ccServerSideDataCopyA ( NQ_CHAR srcPath,
NQ_CHAR dstPath,
void *  context,
CCServerSideCopyCallback callBack 
)

This function is called by application to perform server side copy to a new location. The source and the destination files must be on the same server. Some servers do not support server-side data copy operation such as SMB1 servers, old versions of SAMBA and NetApp. In this case the error code that will be set is NQ_ERR_NOTSUPPORTED. Some servers do not support server-side data copy across different shares such as old versions of SAMBA and lower or equal to SMB 3.0.0 versions of MAC. In this case the error code that will be set is NQ_ERR_NOTSUPPORTED.

Parameters
srcPathPath to the source file.
dstPathPath to the destination file.
contextA pointer to a context for the callBack function, if needed.
callBackUser defined method that will be called at a completion of an asynchronous server-side data copy operation, can be null. Currently not in use.
Returns
This function returns TRUE if file was copy successfully or FALSE otherwise. The application can inspect the error code for the failure reason.
Note
This is an ASCII version of ccServerSideDataCopy()
NQ_BOOL ccServerSideDataCopy ( NQ_WCHAR srcPath,
NQ_WCHAR dstPath,
void *  context,
CCServerSideCopyCallback callBack 
)

This function is called by application to perform server side copy to a new location. The source and the destination files must be on the same server. Some servers do not support server-side data copy operation such as SMB1 servers, old versions of SAMBA and NetApp. In this case the error code that will be set is NQ_ERR_NOTSUPPORTED. Some servers do not support server-side data copy across different shares such as old versions of SAMBA and lower or equal to SMB 3.0.0 versions of MAC. In this case the error code that will be set is NQ_ERR_NOTSUPPORTED.

Parameters
srcPathPath to the source file.
dstPathPath to the destination file.
contextA pointer to a context for the callBack function, if needed.
callBackUser defined method that will be called at a completion of an asynchronous server-side data copy operation, can be null. Currently not in use.
Returns
This function returns TRUE if file was copy successfully or FALSE otherwise. The application can inspect the error code for the failure reason.
NQ_BOOL ccGetDiskFreeSpaceA ( const NQ_CHAR pathName,
NQ_UINT sectorsPerCluster,
NQ_UINT bytesPerSector,
NQ_UINT freeClusters,
NQ_UINT totalClusters,
NQ_UINT fsType,
NQ_UINT serialNumber 
)

This function is called by application to get the free disk space information for the specified remote share.

Parameters
pathNamePath of any object on the remote share the free disk space information is requested for.
sectorsPerClusterPointer to a variable which will receive the number of sectors per cluster on the remote share.
bytesPerSectorPointer to a variable which will receive the number of bytes per sector on the remote share.
freeClustersPointer to a variable which will receive the number of free clusters on the remote share.
totalClustersPointer to a variable which will receive the number of total clusters on the remote share.
fsTypePointer to a variable which will receive the type of the file system.
serialNumberPointer to a variable which will receive the serial number of the file system
Returns
This function returns TRUE if the remote disk information is received successfully or FALSE otherwise. The application can inspect the error code for the failure reason.
Note
This is an ASCII version of ccGetDiskFreeSpace()
NQ_BOOL ccGetDiskFreeSpace ( const NQ_WCHAR pathName,
NQ_UINT sectorsPerCluster,
NQ_UINT bytesPerSector,
NQ_UINT freeClusters,
NQ_UINT totalClusters,
NQ_UINT fsType,
NQ_UINT serialNumber 
)

This function is called by application to get the free disk space information for the specified remote share.

Parameters
pathNamePath of any object on the remote share the free disk space information is requested for.
sectorsPerClusterPointer to a variable which will receive the number of sectors per cluster on the remote share.
bytesPerSectorPointer to a variable which will receive the number of bytes per sector on the remote share.
freeClustersPointer to a variable which will receive the number of free clusters on the remote share.
totalClustersPointer to a variable which will receive the number of total clusters on the remote share.
fsTypePointer to a variable which will receive the type of the file system.
serialNumberPointer to a variable which will receive the serial number of the file system
Returns
This function returns TRUE if the remote disk information is received successfully or FALSE otherwise. The application can inspect the error code for the failure reason.
NQ_BOOL ccGetDiskFreeSpaceExA ( const NQ_CHAR pathName,
NQ_UINT sectorsPerCluster,
NQ_UINT bytesPerSector,
NQ_UINT64 freeClusters,
NQ_UINT64 totalClusters,
NQ_UINT fsType,
NQ_UINT serialNumber 
)

Extended version of ccGetDiskFreeSpace(). When disk is larger than 4 giga clusters - only the extended version gives the correct result.

Parameters
pathNamePath of any object on the remote share the free disk space information is requested for.
sectorsPerClusterPointer to a variable which will receive the number of sectors per cluster on the remote share.
bytesPerSectorPointer to a variable which will receive the number of bytes per sector on the remote share.
freeClustersPointer to a variable which will receive the number of free clusters on the remote share.
totalClustersPointer to a variable which will receive the number of total clusters on the remote share.
fsTypePointer to a variable which will receive the type of the file system.
serialNumberPointer to a variable which will receive the serial number of the file system
Returns
This function returns TRUE if the remote disk information is received successfully or FALSE otherwise. The application can inspect the error code for the failure reason.
NQ_BOOL ccGetDiskFreeSpaceEx ( const NQ_WCHAR pathName,
CCVolumeInfo volumeInfo 
)

Extended version of ccGetDiskFreeSpace(). When disk is larger than 4 giga clusters - only the extended version gives the correct result.

Parameters
pathNamePath of any object on the remote share the free disk space information is requested for.
volumeInfoPointer to a variable which will receive the volume information, see CCVolumeInfo.
Returns
This function returns TRUE if the remote disk information is received successfully or FALSE otherwise. The application can inspect the error code for the failure reason.
NQ_UINT32 ccGetFileAttributesA ( const NQ_CHAR fileName)

This function is called by application to get attributes of the specified file.

Parameters
fileNamePath to the file.
Returns
This function returns file attributes if successful (see File attributes module) or NQ_ERR_ATTRERROR in case of failure. The application can inspect the error code for the failure reason.
NQ_BOOL ccGetFileAttributes ( const NQ_WCHAR fileName,
NQ_UINT32 attributes 
)

This function is called by application to get attributes of the specified file.

Parameters
fileNamePath to the file.
attributesPointer to attributes value.
Returns
This function returns TRUE if successful and the file attributes in attributes parameter (see File attributes module) otherwise FALSE. The application can inspect the error code for the failure reason.
NQ_BOOL ccSetFileAttributesA ( const NQ_CHAR fileName,
NQ_UINT32  attributes 
)

This function is called by application to set attributes of the specified file.

Parameters
fileNamePath to the file.
attributesAttributes to set. See File attributes module for values.
Returns
This function returns TRUE if the specified attributes are set successfully or FALSE otherwise. The application can inspect the error code for the failure reason.
Note
This is an ASCII version of ccSetFileAttributes()
NQ_BOOL ccSetFileAttributes ( const NQ_WCHAR fileName,
NQ_UINT32  attributes 
)

This function is called by application to set attributes of the specified file.

Parameters
fileNamePath to the file.
attributesAttributes to set. See File attributes module for values.
Returns
This function returns TRUE if the specified attributes are set successfully or FALSE otherwise. The application can inspect the error code for the failure reason.
See Also
File attributes module
NQ_BOOL ccGetFileInformationByNameA ( const NQ_CHAR fileName,
FileInfo_t fileInfo 
)

This function is called by application to get the information of the specified file.

Parameters
fileNamePath to the file.
fileInfoPointer to a structure which will receive the file information (see CCFileInfo Structure).
Returns
This function returns TRUE if the specified file information is obtained successfully or FALSE otherwise. The application can inspect the error code for the failure reason.
Note
This is an ASCII version of ccGetFileInformationByName()
NQ_BOOL ccGetFileInformationByName ( const NQ_WCHAR fileName,
CCFileInfo fileInfo 
)

This function is called by application to get the information of the specified file.

Parameters
fileNamePath to the file.
fileInfoPointer to a structure which will receive the file information (see CCFileInfo Structure).
Returns
This function returns TRUE if the specified file information is obtained successfully or FALSE otherwise. The application can inspect the error code for the failure reason.
NQ_BOOL ccSetFileSizeByNameA ( const NQ_CHAR fileName,
NQ_UINT32  sizeLow,
NQ_UINT32  sizeHigh 
)

This function is called by application to set file size when file is specified by its name.

Parameters
fileNamePath to file.
sizeLowLow 32 bit desired file size.
sizeHighHigh 32 bit desired file size.
Returns
This function returns TRUE if the file size was modified successfully or FALSE otherwise.

When the specified file size is less than the current file size, this operation truncates the file to the specified size.

NQ_BOOL ccSetFileSizeByName ( const NQ_WCHAR fileName,
NQ_UINT64  size 
)

This function is called by application to set file size when file is specified by its name.

Parameters
fileNamePath to file.
size64 bit desired file size.
Returns
This function returns TRUE if the file size was modified successfully or FALSE otherwise.

When the specified file size is less than the current file size, this operation truncates the file to the specified size.

NQ_BOOL ccSetFileSizeByHandle ( NQ_HANDLE  handle,
NQ_UINT64  size 
)

This function is called by application to apply size to an open file. When the specified file size is less than the current file size, this operation truncates the file to the specified size.

Parameters
handleHandle value returned by calling ccCreateFile().
size64 bit desired file size.
Returns
This function returns TRUE if the file size was modified successfully or FALSE otherwise.
NQ_BOOL ccGetFileTime ( NQ_HANDLE  handle,
CCFileTime pCreation,
CCFileTime pLastAccess,
CCFileTime pLastWrite 
)

This function is called by application to get the time information of the specified file.

Parameters
handleHandle value returned by calling ccCreateFile()
pCreationPointer to a buffer for file creation time. This buffer should hold the time structure (see CCFileTime Structure)
pLastAccessPointer to a buffer for file last access time. This buffer should hold the time structure (see CCFileTime Structure)
pLastWritePointer to a buffer for file last write time. This buffer should hold the time structure (see CCFileTime Structure)
Returns
This function returns TRUE if the specified file time information is obtained successfully or FALSE otherwise. The application can inspect the error code for the failure reason.
NQ_BOOL ccSetFileTime ( NQ_HANDLE  handle,
CCFileTime pCreation,
CCFileTime pLastAccess,
CCFileTime pLastWrite 
)

This function is called by application to set the time information of the specified file.

NQ Client sends time modification request using the provided time values but the server interpretation of this request may apply additional calculations, so that the resulted file times may differ. Null can be passed when no change is required in one of the times.

Parameters
handleHandle value returned by calling ccCreateFile().
pCreationPointer to a structure holding the file creation time (see CCFileTime Structure)
pLastAccessPointer to a structure holding the file last access time (see CCFileTime Structure)
pLastWritePointer to a structure holding the file last write time (see CCFileTime Structure)
Returns
This function returns TRUE if the specified file time information is set successfully or FALSE otherwise. The application can inspect the error code for the failure reason.
NQ_BOOL ccGetFileSize ( NQ_HANDLE  handle,
NQ_UINT64 fileSize 
)

This function is called by application to get the size of the specified file.

Parameters
handleHandle value returned by calling ccCreateFile()
fileSizePointer to a buffer for the NQ_UINT64 value
Returns
This function returns TRUE if the specified file information is obtained successfully or FALSE otherwise. The application can inspect the error code for the failure reason.
NQ_BOOL ccGetFileInformationByHandle ( NQ_HANDLE  handle,
CCFileInfo fileInfo 
)

This function is called by application to get the information of an open file

Parameters
handleHandle value returned by calling ccCreateFile()
fileInfoPointer to a structure holding the file information (see CCFileInfo Structure)
Returns
This function returns TRUE if the specified file information is obtained successfully or FALSE otherwise. The application can inspect the error code for the failure reason.